{include file="public/header" /}
<div class="thinkask-publish">
	<div class="container">
	  <div class="page page-default">
	    <div class="page-heading">
        <h3>发布问题</h3>	        
	    </div>
	    <div class="panel-body">
        <form  class="form-horizontal cForm" method="post">
          
            <div class="form-group">
               <label for="" class="col-md-2 control-label">标题</label>                
               <div class="col-md-9">
                 <div class="input-group">
                  <input type="text" class="form-control" name="question_content" value="<?php echo $question_content; ?>">
               
                  <div class="input-group-btn">
                    <select name="category_id" class="btn dropdown-toggle">
                      <option value="0" >不选择分类</option>
                    	{volist name="category" id="v"}
                        <option value="{$v.id}" {if condition="$category_id==$v['id']"} selected="" {/if}>{$v.title}</option>
                      {/volist}
                    </select>
                  </div>
                
                </div>
               </div>
            </div>   
            
            <div class="form-group">
              <label for="" class="col-md-2 control-label">内容</label>            	  
              <div class="col-md-9">
                 <script type="text/javascript" src="/public/static/template/asset/ueditor/ueditor.config.js"></script>
                  <script type="text/javascript" src="/public/static/template/asset/ueditor/ueditor.all.js"></script>
                  <script type="text/javascript" src="/public/static/template/asset/ueditor/ueditor.parse.js"></script>
                  <textarea name="question_detail" class="question_detail-baiduedit"  style="display:none;">{$question_detail}</textarea>
                   <script id="question_detail" type="text/plain" style="height:300px">{:e($question_detail)}</script>
                  <script type="text/javascript">
                      var ue = UE.getEditor('question_detail', {
                              toolbars: [
                                            // ['fullscreen', 'source', 'undo', 'redo'],
                                            ['bold', //加粗
                                             'italic', //斜
                                             'underline', //下划线
                                             // 'fontborder', 
                                             'strikethrough',  //删除线
                                              'customstyle', //插入标题
                                              'blockquote',//引用
                                              'insertorderedlist', //有序列表
                                              'insertunorderedlist', //无序列表
                                              'link', //超链接
                                              'simpleupload', //单图上传
                                              'insertimage', //多图上传
                                              'insertvideo', //视频
                                              'removeformat', //清除格式

                                            ]
                                        ],
                              theme:'thinkask',
                              themePath:'{$Think.__STATIC__}/static/system/ueditorPlug/',
                              focus:true,//初始化时，是否让编辑器获得焦点true或false
                              // initialFrameHeight:100,
                              
                            });
                      ue.addListener( "selectionchange", function () {
                          $(".question_detail-baiduedit").val(ue.getContent())
                         
                      } );
                      
                 </script>
              </div>
            </div>
              <input type="hidden" name="published_uid" value="{$uid}">
              <input type="hidden" name="id" value="{$question_id}">
            <div class="form-group">
              <div class="col-md-2">
                
              </div>
              <div class="col-lg-9">
              <div class="btn-group" role="group" aria-label="...">
                  <a type="button" class="btn btn-info"> <i class='fa fa-tag'></i>选择标签</a>
                  <a type="button" class="btn btn-primary tPost" form="cForm" url="{:url('question/api/edit')}"><i class='fa fa-question'></i>发布问题</a>
                </div>

              </div>
            </div>
            
        </form>	      	
	    </div>
	  </div>
	</div>
</div>

{include file="public/footer" /}